In this How To we are going to build Ncurses 5.9 with our GCC 4.8.2 cross-compiler. Be sure to start this build in a new terminal/tab to avoid any pollution from previous builds. I know not very many out there create terminal apps anymore, but this API is a lot of fun ;-) And I'm still a big fan of the CLI (terminal). If you want to give Ncurses a try, take a look at Programmer's Guide to NCurses.
Tar Balls
Here is a list of source packages that we'll need for the build. You can either download them now or wait 'til later in the How To.
ncurses-5.9.tar.gz
Create a Workspace
I recommend creating a workspace under your /home/<your user>/ directory that is dedicated to this build. So let's fire up your terminal and run the following:
NOTE: Depending on whether you are using a cross-compiler built from my other wikis you might need to change INSTALLDIR to point to your cross-compiler.
Build Ncurses
$ cd ..build/
$ ../src/ncurses-5.9/./configure --host=$TARGETMACH --prefix=/home/<your user>/workbench/ncurses/final --with-shared --without-debug --without-ada --enable-overwrite
$ make
$ make install
NOTE: You might get an error about ranlib during make; I still ran make install and everything looked *OK*.
Output
cd into the final directory and output its contents:
$ cd ../final/
$ ls
You should have the following directories:
bin
include
lib
man
share
Make sure the binaries are for ARM:
$ cd bin/
$ file clear
bash: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped
If you see something similar to above you're good to go ;-)
Lastly, move the contents of these directories, or the directories themselves if they do not already exist, to your custom Linux file system or dev board. For Ncurses, the files should go under /usr.
How To Build Ncurses for ARM
Intro
In this How To we are going to build Ncurses 5.9 with our GCC 4.8.2 cross-compiler. Be sure to start this build in a new terminal/tab to avoid any pollution from previous builds. I know not very many out there create terminal apps anymore, but this API is a lot of fun ;-) And I'm still a big fan of the CLI (terminal). If you want to give Ncurses a try, take a look at Programmer's Guide to NCurses.
Tar Balls
Here is a list of source packages that we'll need for the build. You can either download them now or wait 'til later in the How To.
Create a Workspace
I recommend creating a workspace under your /home/<your user>/ directory that is dedicated to this build. So let's fire up your terminal and run the following:
Gather the Sources
Now that we have a workspace created and we are currently in the src directory we can begin bringing down the sources and extracting them.
ncurses
Build Environment
To make things a little smoother let's setup some environment variables:
$ export INSTALLDIR=~/workbench/gcc-4.8.2/arm $ export PATH=$INSTALLDIR/bin:$PATH $ export TARGETMACH=arm-none-linux-gnueabi $ export BUILDMACH=i686-pc-linux-gnu $ export CROSS=arm-none-linux-gnueabi $ export CC=${CROSS}-gcc $ export LD=${CROSS}-ld $ export AS=${CROSS}-asNOTE: Depending on whether you are using a cross-compiler built from my other wikis you might need to change INSTALLDIR to point to your cross-compiler.Build Ncurses
NOTE: You might get an error about ranlib during make; I still ran make install and everything looked *OK*.
Output
cd into the final directory and output its contents:
You should have the following directories:
Make sure the binaries are for ARM:
If you see something similar to above you're good to go ;-)
Lastly, move the contents of these directories, or the directories themselves if they do not already exist, to your custom Linux file system or dev board. For Ncurses, the files should go under /usr.